import axios from "../../request/axios";
import { useEffect, useState } from "react";
function Bq() {
  const [AAA, setAAA] = useState([]);
  useEffect(() => {
    axios.get("http://blogapi.shbwyz.com/category/list").then((res) => {
      console.log(res);
      setAAA(res.data);
    });
  }, []);
  return (
    <div>
      {AAA.map((item: any) => {
        return (
          <>
            <button style={{ margin: "5px" }}>{item.name}</button>
            {item.count}
          </>
        );
      })}
    </div>
  );
}

export default Bq;
